package com.cskaoyan.controller;/*
 *  @Author tsuki
 *  @Date 2021/4/11
 *  @Description
 *
 */

import com.cskaoyan.bo.user.WxCollectBo;
import com.cskaoyan.service.user.UserService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


@RestController
public class WxCollectController {
    @Autowired
    UserService userService;

    @RequestMapping("/wx/collect/list")
    public BaseRespVo listQuery(Byte type,Integer page,Integer size){
        Map<String,Object> map = userService.wxCollectQuery(type,page,size);
        return BaseRespVo.ok(map);
    }


    @RequestMapping("wx/collect/addordelete") //valueId 1097005 type 0
    public BaseRespVo addordelete(@RequestBody WxCollectBo wxCollectBo){
        System.out.println(wxCollectBo);
        Map<String,String> res = userService.wxCollectAD(wxCollectBo);
        return BaseRespVo.ok(res);
    }
}
